jEdit (r13380), XML v2.0.9
With the attached file, when I try to close the '<head>' tag by typing '</', it closes
the '<script>' tag on Line 7 instead. It's reading the '<script>' tags inside of
the strings, which is incorrect.
| Submitted | hunteke - 2008-08-21 11:36:41 | Assigned | kerik-sf |
|---|---|---|---|
| Priority | 5 | Labels | |
| Status | open | Group | None |
| Resolution | None |
| 2008-09-02 15:10:57 kpouer |
Logged In: YES |
|---|---|
| 2008-09-02 17:58:04 hunteke |
HTML compliant, and correctly recognized by jEdit/XML plugin html_compliant.html (305B) |
| 2008-09-02 17:58:04 hunteke |
Logged In: YES |
| 2008-09-02 18:23:26 hunteke |
Diff against html_compliant.html to break XML plugin html_diff.diff (458B) |
| 2008-09-02 18:23:27 hunteke |
Logged In: YES |
| 2010-05-14 11:51:07 kerik-sf |
- **assigned_to**: nobody --> kerik-sf |
| 2010-05-16 17:56:35 ezust |
I see everything works fine with the "html-compliant.html" test file, as long as
I am parsing using the HTML parser.
|
| 2010-05-17 18:42:40 daleanson |
Actually, the html sidekick delegates a lot to the xml sidekick. The problem seems
to be in the XML sidekick code, specificially in xml.parser.TagParser.findStartTag().
This method just works backwards through the code until it finds a matching start
tag and takes no account of the sidekick Asset, which gives the actual start and end
of a tag.
|
| 2010-05-17 18:43:41 daleanson |
xml file that causes the same problem |
| 2010-05-18 07:30:06 hunteke |
I apologize for forgetting to get back on this bug. I'm having a devil of a time
tracking down the report now, or even a reference, but I have a recollection that
my original assumption was incorrect. I recall pointing out this "error" to the W3
folks (or someone), and was informed that my formulation was actually incorrect.
|
| 2010-05-18 07:32:49 hunteke |
Example of encoding the left chevron before use. proper_method.html (479B) |
| 2010-05-18 07:39:27 hunteke |
Of course, \*now\* I look at your upload, Dale. Your example certainly /seems/ intuitive and explicit to me, but I'm afraid I don't know XML well enough to know for sure. I have a hunch however, that the XML snippet is in fact, not correct. My gut says you need to encode not just the left chevron, but the right one as well. Suggested differential attached. |
| 2010-05-18 07:40:23 hunteke |
Encoding of chevrons to fix example XML file diff_to_fix.diff (385B) |
| 2010-05-18 17:09:11 kerik-sf |
Dale: your exemple indeed doesn't parse as XML.
|
| 2010-05-18 17:30:42 daleanson |
Sorry to muddy the situation -- I wasn't saying the file I attached would parse correctly
as XML since it won't. I was just trying to point out where the problem is. The
problem is that the html sidekick delegates to the xml sidekick for tag matching.
Often, html is not valid xml, which means the xml sidekick does not necessarily find
the matching tag, as the original example and my example show.
|